<template>
  <div class="select" :style="{'height':data.height*40 + (data.height-1)*8 + 'px'}">
    <div class="name" :style="{'line-height':data.height*40 + (data.height-1)*8 + 'px'}">下拉选项:</div>
    <el-select :style="{'margin-top':(data.height*40 + (data.height-1)*8 -30)/2 + 'px'}" v-model="data.value" placeholder="请选择">
      <el-option v-for="item in data.options" :key="item.value" :label="item.label" :value="item.value">
      </el-option>
    </el-select>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Object
    }
  },
  data() {
    return {

    }
  },
  computed: {},
  methods: {},
  mounted() {
    console.log(this.data)
  }
}

</script>
<style lang="less">
.select{
  width: 100%;
  height: 100%;
  display: flex;
  border: 1px dashed #e2e2e2;
  box-sizing: border-box;
  border-radius: 6px;
  height: 40px;
  line-height: 38px;
  .name {
    padding: 0 10px;
  }
  .el-select {
    flex: 1;
    padding-right: 10px;
    height: 30px;
    line-height: 30px;
    margin-top: 4px;
    .el-input{
      height: 100%;
      input{
        height: 100%;
      }
    }
  }
}

</style>
